package com.woniuxy.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.woniuxy.entity.Out_Bound;
import com.woniuxy.entity.WareHousing;
import com.woniuxy.service.Out_BoundService;

@RestController //所有数据默认以json返回
@RequestMapping("/outbound")
public class Out_BoundController {
	@Autowired
	private Out_BoundService out_BoundService;
	
	@GetMapping("/find")
	public List<Out_Bound> findOutBound() {
		return out_BoundService.findOutBound();
	}
	@RequestMapping("/detail")
	public List<Out_Bound> findOutBoundDeatilById(String oborder) {
		return out_BoundService.findOutBoundDeatilById(oborder);
	}
	@RequestMapping("/insert")
	public String insertOutBound(Out_Bound out_Bound){
		int i=out_BoundService.insertOutBound(out_Bound);
		if (i==1) {
			return "success";
		}else{
			return "false";
		}
	}
	@RequestMapping("/delete")
	public String deleteOutBound(String oborder){
		int i=out_BoundService.deleteOutBound(oborder);
		if (i==1) {
			return "success";
		}else{
			return "false";
		}
	}
}
